//
//  CoreDataManager.h
//  CoreData
//
//  Created by cuixin on 15/11/3.
//  Copyright © 2015年 cuixin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@interface CoreDataManager : NSObject

//数据管理器
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;


//数据模型器
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;

//连接器
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

//单例方法
+(CoreDataManager *)shareManager;

//保存之后才会把数据写在本地
- (void)saveContext;


//获取document文件路径
- (NSURL *)applicationDocumentsDirectory;

@end
